package com.som.beanconvert.data1.output;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.ss.usermodel.Row;

import com.som.bean.data1.input.IpAddressAllInfo;
import com.som.bean.data1.output.IpaddressJoin;
import com.som.beanconvert.ExcelDataParseOutputInf;

/**
 * 通过LOOPBACK地址让数据二与数据三关联 以设备采集的数据为准 输出列为: IP地址 路由(network) 网元信息 区县
 * 
 * @author liujun
 * @date 2016年4月8日
 * @verion 0.0.1
 */
public class IpaddressJoinExcelOutput extends IpAddressAllInfo implements ExcelDataParseOutputInf<IpaddressJoin>
{

	public void parseExcelRow(IpaddressJoin beaninfo, Row row) 
	{
		HSSFRow hrow = (HSSFRow) row;

		// 设置ip信息
		HSSFCell cellIp = hrow.createCell(0);
		cellIp.setCellType(HSSFCell.CELL_TYPE_STRING);
		cellIp.setCellValue(beaninfo.getIpaddress());

		// 设置路由(network)
		HSSFCell cellMask = hrow.createCell(1);
		cellMask.setCellType(HSSFCell.CELL_TYPE_STRING);
		cellMask.setCellValue(beaninfo.getNetwork());

		// 网元信息
		HSSFCell cellNe = hrow.createCell(2);
		cellNe.setCellType(HSSFCell.CELL_TYPE_STRING);
		cellNe.setCellValue(beaninfo.getNeInfo());

		HSSFCell cellArea = hrow.createCell(3);
		cellArea.setCellType(HSSFCell.CELL_TYPE_STRING);
		cellArea.setCellValue(beaninfo.getAreainfo());
	}

}
